package com.oig.sys.base.app.impl;

import com.oig.sys.base.app.IAppCustomsService;
import com.oig.sys.base.dto.CustomsDto;
import com.oig.sys.base.service.ITbCustomsService;
import com.oig.sys.base.vo.CustomsVo;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@RequiredArgsConstructor
public class AppCustomsServiceImpl implements IAppCustomsService {

    private final ITbCustomsService customsService;


    @GlobalTransactional
    @Override
    public CustomsVo addTbCustoms(CustomsDto customsDto) {
        return customsService.addTbCustoms(customsDto);
    }

    @GlobalTransactional
    @Override
    public CustomsVo updateTbCustoms(CustomsDto customsDto) {
        return customsService.updateTbCustoms(customsDto);
    }

    @GlobalTransactional
    @Override
    public void cancelTbCustoms(Integer id) {
        customsService.cancelTbCustoms(id);
    }
}
